<?php
/**
 * @package		Joomla.Administrator
 * @subpackage		com_travel
 * @copyright		Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

// no direct access
defined('_JEXEC') or die;
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
$doc =& JFactory::getDocument();
$styles = "ul.multicheckbox li label{ clear: none;display: inline;}";
$doc->addStyleDeclaration($styles);
?>
<script type="text/javascript">
Joomla.submitbutton = function(task) {
	if (task == 'tour.cancel' || document.formvalidator.isValid(document.id('tour-form'))) {
		Joomla.submitform(task, document.getElementById('tour-form'));
	} else {
		alert('<?php echo $this->escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED'));?>');
	}
}
</script>

<form action="<?php echo JRoute::_('index.php?option=com_travel&layout=edit'); ?>" enctype="multipart/form-data" method="post" name="adminForm" id="tour-form" class="form-validate">
<div class="width-50 fltlft">
	<fieldset class="adminform">
		<legend><?php echo empty($this->item->id) ? JText::_('COM_TRAVEL_NEW_BANNER') : JText::sprintf('COM_TRAVEL_BANNER_DETAILS', $this->item->id); ?></legend>
		<ul class="adminformlist">
		
			<li><?php echo $this->form->getLabel('catsid'); ?>
			<?php echo $this->form->getInput('catsid'); ?></li>
			
			<li><?php echo $this->form->getLabel('published'); ?>
			<?php echo $this->form->getInput('published'); ?></li>
			
			<?php
			foreach($this->fields as $field) {
				echo '<li>';
				echo $this->field->showFieldForm($field,$this->item,$this->default);
				echo '</li>';
			}
			?>
		</ul>
	</fieldset>
</div>
<div class="width-50 fltrt">
	<fieldset class="adminform">
		<?php echo $this->form->getLabel('t_itinerary'); 
			  echo $this->form->getInput('t_itinerary'); ?>
		<div class="clr"></div>
	</fieldset>		
</div>
<div>
	<input type="hidden" name="valueCount" value=<?php echo $i; ?> />	
	<input type="hidden" name="task" value="" />
	<?php echo JHtml::_('form.token'); ?>
</div>
<div class="clr"></div>
</form>